//package com.example.mongodb.mongodb.controller;
//
//import com.example.mongodb.mongodb.config.FastDfsConfig;
//import org.csource.common.MyException;
//import org.csource.common.NameValuePair;
//import org.csource.fastdfs.StorageClient1;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.io.IOException;
//
//@RestController
//public class FastDfsController {
//
//    @Autowired
//    private StorageClient1 client;
//    @GetMapping("/testUpload")
//    public void testUpload() throws IOException, MyException {
//        //文件元信息
//        NameValuePair[] list = new NameValuePair[1];
//        list[0] = new NameValuePair("demo1","1.jpg");
//        //上传返回fileId
//        String fileId = client.upload_file1("C:\\Users\\admin\\Desktop\\123.jpg","jpg",list);
//        System.out.println(fileId);
//    }
//}
